<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/common.jsp"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
  <head>
  <title>修改操作员信息</title>
  <%@ include file="/common/meta.jsp"%>     
  <link href="<c:url value='/styles/form.css'/>" type="text/css" rel="stylesheet">
  </head>
  <script>
   function validateForm(){
  	if($("operatorPo.loginId").value==""){
  		alert("登陆ID不能为空");
  		return false;
  	}
  	if($("operatorPo.opName").value==""){
  		alert("操作员名称不能为空");
  		return false;
  	}
  
	return true;
  }
  function checkemail()
  {
  	
      var re=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
      var email = $("operatorPo.email").value;
      if(email!=""){
	      if(!re.test(email))
	      {
	          alert("邮件地址无效！");
	          $("operatorPo.email").focus();
	          return false;
	      }
      }
  }
  function checkmobile()
  {
     var code= $("operatorPo.mobile").value;
     var re=/^(130|131|133|135|135|137|138|139|159|158|153)(\d){8}$/; 
     if(code!=""){
	     if(!re.test(code))
	     {
	         alert("手机号码无效！");
	         $("operatorPo.mobile").focus();
	        return false;
	     }  
     }
  }
  
  </script>
  <body>
	<div align="center" >
		<div id="detailheader">
			<img src="<%=request.getContextPath()%>/images/main/main_ban01Dot.png" />
			<div>修改配置信息</div>
		</div>		 
		<html:form action="/operator.do?method=update" method="post" onsubmit="return validateForm()">			
			<div class="formTable" style="width:90%;">
				<div class="formTitle">
					<div class="formTitleL"></div>
					<div class="formTitleM">修改操作员信息</div>
					<div class="formTitleR"></div>
				</div>
				<div class="formContent">
							<table width="90%">
								<tr>
									<html:hidden property="operatorPo.opId"/>
									<html:hidden property="operatorPo.isOnline"/>
									
									<td align="left">登陆ID<font color="red">*</font>:</td>
									<td align="left" nowrap="nowrap">
									<html:text property="operatorPo.loginId" readonly="true"/>
									</td>
								</tr>
								<tr>
									<td align="left">操作员名称<font color="red">*</font>:</td>
									<td align="left">
									<html:text property="operatorPo.opName" />
									</td>
								</tr>
							  	<tr>
									<td align="left">密码:</td>
									<td align="left">
									<html:password property="operatorPo.password" style="width:130px" value="" />
									</td>
								</tr>
								
								<tr>
									<td align="left">员工编号:</td>
									<td align="left">
									<html:text property="operatorPo.opCode" />
									</td>
								</tr>							
								<tr>
									<td align="left" >性别<font color="red">*</font>:</td>
									<td align="left">
									<html:select property="operatorPo.sex" style="width:130px">
										<html:option value="0">未知</html:option>
										<html:option value="1">男</html:option>
										<html:option value="2">女</html:option>
									</html:select>
									</td>
								</tr>
								<tr>
									<td align="left" >部门ID:</td>
									<td align="left"><html:text property="operatorPo.departId" />
									</td>
								</tr>
								<tr>
									<td align="left" >手机号:</td>
									<td align="left"><html:text property="operatorPo.mobile" onblur="checkmobile()"/>
									</td>
								</tr>
								<tr>
									<td align="left" >邮件地址:</td>
									<td align="left"><html:text property="operatorPo.email" onblur="checkemail()"/>
									</td>
								</tr>
								<tr>
									<td align="left" >状态<font color="red">*</font>:</td>
									<td align="left"><html:select property="operatorPo.status" style="width:130px">
										<html:option value="0">正常</html:option>
										<html:option value="1">注销</html:option>
										<html:option value="2">删除</html:option>
										<html:option value="9">不可改变</html:option>
									</html:select>
									</td>
								</tr>
								<tr>
									<td align="left" >备注:</td>
									<td align="left">
									<textarea rows="5" cols="18" name="operatorPo.remark"><bean:write name="operatorForm" property="operatorPo.remark"/></textarea>
									</td>
								</tr>
								<tr>
									<td align="center" colspan="2">
										<html:submit styleClass="btn_Xp_Bg0" value="确 定"/>&nbsp;&nbsp;&nbsp;
										<html:reset styleClass="btn_Xp_Bg0" value="重 置"/>
									</td>
								</tr>
							</table>
				</div>
			</div>
		</html:form>
		</div>
	</body>	
</html>
